CallStyle
Helper class for generating large-format notifications that include a caller and required actions, and indicate an incoming call. If the platform does not provide large-format notifications, this method has no effect. The user will always see the normal notification view. This class is a "rebuilder": It attaches to a Builder object and modifies its behavior, like so:
Notification notification = new NotificationCompat.Builder(mContext)
.setSmallIcon(R.drawable.new_post)
.setStyle(
new Notification.CallStyle.forIncomingCall(caller, declineIntent, answerIntent))
.build();
Content copied to clipboard
Constructors
Types
Link copied to clipboard
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun forIncomingCall(@NonNull person: Person, @NonNull declineIntent: PendingIntent, @NonNull answerIntent: PendingIntent): NotificationCompat.CallStyle
Creates a CallStyle for an incoming call.
Link copied to clipboard
open fun forOngoingCall(@NonNull person: Person, @NonNull hangUpIntent: PendingIntent): NotificationCompat.CallStyle
Creates a CallStyle for an ongoing call.
Link copied to clipboard
open fun forScreeningCall(@NonNull person: Person, @NonNull hangUpIntent: PendingIntent, @NonNull answerIntent: PendingIntent): NotificationCompat.CallStyle
Creates a CallStyle for a call that is being screened.
Link copied to clipboard
Gets the actions list for the call with the answer/decline/hangUp actions inserted in the correct place.
Link copied to clipboard
Sets an optional color to be used as a hint for the Answer action button's color.
Link copied to clipboard
Sets an optional color to be used as a hint for the Decline or Hang Up action button's color.
Link copied to clipboard
Sets whether the call is a video call, which may affect the icons or text used on the required action buttons.
Link copied to clipboard
Sets an optional icon to be displayed with text as a verification status of the caller.
Link copied to clipboard
open fun setVerificationText(@Nullable verificationText: CharSequence): NotificationCompat.CallStyle
Sets optional text to be displayed with an icon as a verification status of the caller.